
local beenTo = {}
local save = achievements.GetValue( "Server Browser", "list", "" )
if ( save != "" ) then
	beenTo = string.Explode( "\n", save )
end

local function Think()
	local name = GetGlobalString( "ServerName" )
	if ( !name || name == "" ) then return end
	
	if ( total != 100 && !table.HasValue( beenTo, name ) ) then
		beenTo[ #beenTo + 1 ] = name
		achievements.SetValue( "Server Browser", "list", table.concat( beenTo, "\n" ) )
		
		local total = math.Clamp( #beenTo, 0, 100 )
		achievements.Update( "Server Browser", total / 100, total .. "/100" )
	end
end
hook.Add( "Think", "Achievements.ServerBrowser", Think )

local total = #beenTo
achievements.Register( "Server Browser", "Visit 100 different servers.", "achievements/serverbrowser", total / 100, total .. "/100" )